using UnityEngine;

public class MoveSinus : MonoBehaviour
{
	[SerializeField]
	private float speed = 10f;

	[SerializeField]
	private Vector3 minPosition = Vector3.zero;

	[SerializeField]
	private Vector3 maxPosition = Vector3.up;

	[SerializeField]
	private Transform target;

	private float progress;

	private void Update()
	{
		progress += speed * Time.deltaTime;
		target.transform.localPosition = Vector3.Lerp(minPosition, maxPosition, 0.5f + 0.5f * Mathf.Sin(progress));
	}
}
